Refactoring Idiomatic Exception Handling in C++: Throwing and Catching Exceptions with Aspects
نویسندگان
چکیده
Aspect-oriented programming can be used to modularize crosscutting concerns to improve the maintainability of large systems. Exceptions cross-cut legacy applications and are often implemented in idioms which cannot be globally enforced. We describe an aspect-oriented approach for throwing exceptions in place of the “return code idiom”, and discuss using aspects to handle those exceptions in a modular way. We also describe challenges we encountered in implementing some exception-handling control flow strategies.
منابع مشابه
Students' Understanding of Advanced Properties of Java Exceptions
This study examines how Information Systems Engineering School students on the verge of their graduation understand the mechanism of exception handling. The main contributions of this paper are as follows: we construct a questionnaire aimed at examining students' level of understanding concerning exceptions; we classify and analyse the students' responses to the questionnaire in order to determ...
متن کاملUsing C++ exceptions in the Linux kernel
Driven by the desire to facilitate more maintainable and robust systems, modern programming languages offer explicit constructs to facilitate the handling of exceptional events. The use of exceptions is common in user space programming, and is an integral part of common programming styles and best practices. In spite of this exceptions are rarely used in kernel-space. In fact, some operating sy...
متن کاملA Quantitative Study on the Aspectization of Exception Handling
It is usually assumed that the implementation of exception handling can be better modularized by the use of aspect-oriented programming (AOP). However, the trade-offs involved in using AOP with this goal are not yet wellunderstood. To the best of our knowledge, no work in the literature has attempted to assess whether AOP really promotes an enhancement in well-understood quality attributes othe...
متن کاملJava Idioms - Exception Handling
Exceptions are a powerful feature for the propagation and handling of failure of operations. Naive use of exceptions however introduces subtle complexity into a system due to the nonlocal nature of throwing an exception. This paper presents a pattern language of eleven Java idioms which serve as a framework for using exceptions. The patterns help to balance the forces that the overall complexit...
متن کاملHandler Cloning for Optimizing Exception Handling
Handler cloning is a technique for optimizing exception handling. For a specific exception handler catching and rethrowing multiple classes of exceptions, it creates a clone of the original handler and registers the clone as a handler that catches only a single class or subset of the classes for the original handler. The rethrown exceptions from the clone are determined at the compile time.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2007